From: Jasper St. Pierre Date: Tue, 4 Dec 2012 18:45:52 +0000 (-0500) Subject: switcherPopup: Add a timestamp argument to _finish() X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~5295 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=7ff7ced50423a909c6af2bfaaa9b9a5780330224;p=gnome-shell.git switcherPopup: Add a timestamp argument to _finish() And use it elsewhere. https://bugzilla.gnome.org/show_bug.cgi?id=689653 --- diff --git a/js/ui/altTab.js b/js/ui/altTab.js index f8e0a4476..e8f460db2 100644 --- a/js/ui/altTab.js +++ b/js/ui/altTab.js @@ -261,7 +261,7 @@ const AppSwitcherPopup = new Lang.Class({ this._select(this._selectedIndex, n); }, - _finish : function() { + _finish : function(timestamp) { this.parent(); let appIcon = this._items[this._selectedIndex]; @@ -270,7 +270,7 @@ const AppSwitcherPopup = new Lang.Class({ window = appIcon.cachedWindows[this._currentWindow]; else window = null; - appIcon.app.activate_window(window, global.get_current_time()); + appIcon.app.activate_window(window, timestamp); }, _onDestroy : function() { diff --git a/js/ui/ctrlAltTab.js b/js/ui/ctrlAltTab.js index 14fba02b2..7ed1e4db3 100644 --- a/js/ui/ctrlAltTab.js +++ b/js/ui/ctrlAltTab.js @@ -52,11 +52,11 @@ const CtrlAltTabManager = new Lang.Class({ } }, - focusGroup: function(item) { + focusGroup: function(item, timestamp) { if (item.window) { - Main.activateWindow(item.window); + Main.activateWindow(item.window, timestamp); } else if (item.focusCallback) { - item.focusCallback(); + item.focusCallback(timestamp); } else { if (global.stage_input_mode == Shell.StageInputMode.NONREACTIVE || global.stage_input_mode == Shell.StageInputMode.NORMAL) @@ -164,9 +164,9 @@ const CtrlAltTabPopup = new Lang.Class({ this._select(this._next()); }, - _finish : function() { - this.parent(); - Main.ctrlAltTabManager.focusGroup(this._items[this._selectedIndex]); + _finish : function(time) { + this.parent(time); + Main.ctrlAltTabManager.focusGroup(this._items[this._selectedIndex], time); }, }); diff --git a/js/ui/switcherPopup.js b/js/ui/switcherPopup.js index ebb1628f6..b8ba0d248 100644 --- a/js/ui/switcherPopup.js +++ b/js/ui/switcherPopup.js @@ -151,7 +151,7 @@ const SwitcherPopup = new Lang.Class({ // selection.) let [x, y, mods] = global.get_pointer(); if (!(mods & this._modifierMask)) { - this._finish(); + this._finish(global.get_current_time()); return false; } @@ -198,7 +198,7 @@ const SwitcherPopup = new Lang.Class({ let state = mods & this._modifierMask; if (state == 0) - this._finish(); + this._finish(event.get_time()); return true; }, @@ -224,7 +224,7 @@ const SwitcherPopup = new Lang.Class({ _itemActivated: function(switcher, n) { this._itemActivatedHandler(n); - this._finish(); + this._finish(global.get_current_time()); }, _itemEnteredHandler: function(n) { @@ -274,7 +274,7 @@ const SwitcherPopup = new Lang.Class({ this.actor.destroy(); }, - _finish: function() { + _finish: function(timestamp) { this.destroy(); },